<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Home</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/vue.2.6.js}"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
    <style>th{font-weight:bold}</style>
</head>
<body>
<div class="rbody" id="app">
    <div class="top">
        当前位置：后台<i class="fa fa-fw fa-angle-right"></i>赛事信息
    </div>
    <div class="main" id="eventplace">
        <form th:action="@{/event/audit(EventId=${event.EventId})}" method="post">
            <table class="table">
                <caption>赛事审核</caption>
                <tbody>
                    <tr>
                        <th>赛事编号:</th><td colspan="3" th:text="${event.EventId}" id="eventid"></td>
                        <th>赛事名称:</th><td colspan="3" th:text="${event.EventName}"></td>
                    </tr>
                    <tr>
                        <th>赛事场地:</th><td colspan="6" th:text="${event.EventSite}"></td>
                        <td><button type="button" @click="getPlaceApply()" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal">场地安排</button></td>
                    </tr>
                    <tr>
                        <th>赛事时间:</th><td colspan="2" th:text="${#dates.format(event.EventStartTime,'yyyy-MM-dd')}"></td>
                        <td>到</td><td colspan="3" th:text="${#dates.format(event.EventEndTime,'yyyy-MM-dd')}"></td>
                        <td><button type="submit" class="btn btn-primary btn-xs">器材安排</button></td>
                    </tr>
                    <tr>
                        <th>申请人:</th><td colspan="2" th:text="${event.Applicants}"></td>
                        <th>赛事裁判:</th><td colspan="3" th:text="${event.RefereeName}"></td>
                        <th><button class="btn btn-primary btn-xs">
                            <a style="text-decoration: none;color: white;" th:href="@{../referee/refereeInformation(RefereeId=${event.RefereeId})}">裁判简介</a>
                        </button></th>
                    </tr>
                    <tr>
                        <th>赛事负责人:</th><td colspan="2" th:text="${event.EventPrincipal}"></td>
                        <th>负责人电话:</th><td colspan="2" th:text="${event.PrincipalPhone}"></td>
                        <th>审核者:</th><td th:text="${event.Auditor}"></td>
                    </tr>
                    <tr>
                        <th colspan="6">赛事说明:</th>
                        <th>赛事状态:</th><td th:text="${event.EventStatus}"></td>
                    </tr>
                    <tr>
                        <td colspan="8" th:text="${event.EventExplain}"></td>
                    </tr>
                    <tr>
                        <th colspan="8">审核说明:</th>
                    </tr>
                    <tr>
                        <td colspan="8"><textarea class="form-control" rows="2" name="AuditorText" th:placeholder="${event.AuditorText}"></textarea></td>
                    </tr>
                    <tr th:if="${event.EventStatus}=='待审核'">
                        <td colspan="8">
                            <label class="radio-inline">
                                <input type="radio" name="EventStatus" id="optionsRadios3" value="审核通过" checked> 审核通过
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="EventStatus" id="optionsRadios4"  value="审核未通过"> 审核未通过
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="8" th:if="${event.EventStatus}=='待审核'"><button type="submit" class="btn btn-success" >审核提交</button></td>
                        <td colspan="8" th:if="${event.EventStatus}=='审核未通过'"><button type="submit" class="btn btn-success" name="EventStatus" value="审核通过">审核通过</button></td>
                        <td colspan="8" th:if="${event.EventStatus}=='审核通过'"><button type="submit" class="btn btn-warning" name="EventStatus" value="审核未通过">审核未通过</button></td>
                    </tr>
                </tbody>
            </table>
        </form>

        <!--场地-->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog" style="width: 80%">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">×
                        </button>
                        <h4 class="modal-title" id="myModalLabel">
                            赛事场地安排详情
                        </h4>
                    </div>
                    <div class="modal-body">
                        <div>
                            <div>
                                <div class="container-fluid">
                                    <div class="col-sm-12" id="right">
                                        <div class="table-responsive">
                                            <table class="table table-striped ">
                                                <thead>
                                                <tr>
                                                    <th>场地编号</th>
                                                    <th>场地所属楼层</th>
                                                    <th>场地类型</th>
                                                    <th>预约日期</th>
                                                    <th>可预约时间段</th>
                                                </tr>
                                                </thead>
                                                <tbody v-for='(placeapply,index) in finalList'>
                                                <tr>
                                                    <td>{{placeapply.place_no}}</td>
                                                    <td>{{placeapply.place_storey}}</td>
                                                    <td>{{placeapply.place_type}}</td>
                                                    <td>{{placeapply.apply_date | formatDate}}</td>
                                                    <td>{{placeapply.apply_period}}</td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default"
                                data-dismiss="modal">关闭
                        </button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </div>

</div>
<script th:src="@{../static/js/eventplace.js}"></script>
</body>
</html>